package com.neo.web.controller.pub;

import com.neo.common.annotation.Log;
import com.neo.common.core.controller.BaseController;
import com.neo.common.core.domain.AjaxResult;
import com.neo.common.core.page.TableDataInfo;
import com.neo.common.enums.BusinessType;
import com.neo.common.utils.poi.ExcelUtil;
import com.neo.pub.domain.OutPatient;
import com.neo.pub.domain.Patient;
import com.neo.pub.service.IEleCardService;
import com.neo.pub.service.IPatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 总院开具电子入院证
 * 
 * @author tr
 */
@Controller
@RequestMapping("/pub/eleCard")
public class EleCardController extends BaseController
{
    private String prefix = "pub/elecard";

    @Autowired
    private IEleCardService iEleCardService;


//    @RequiresPermissions("system:user:view")
    @GetMapping()
    public String index()
    {

        return prefix + "/elecard";
    }

//    @RequiresPermissions("system:user:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(OutPatient outPatient)
    {
        startPage();
        List<OutPatient> list = iEleCardService.selectOutPatientList(outPatient);
        return getDataTable(list);
    }

}